<?php

namespace App\Http\Requests\Web;
use App\Http\Requests\BaseRequest;

class WriteRequest extends BaseRequest
{

    public function rules()
    {
        return [
            'title' => 'required|max:50',
            'category_id' => 'required',
            'subs' => 'required|min:0',
        ];
    }
    public  function messages(){
        return [
            'category_id.required'      =>  '分类id 不能为空。',
            'title.required'      =>  '文章标题 不能为空。',
            'subs.required'      =>  '文章内容 不能为空。',
        ];
    }
}
